<?php
function test () {
	global $a;
	unset($a);
}
$a = 1;
test();
echo $a;
exit;
function test1 () {
	global $v1,$v2;
	$v2 =& $v1;
}
function test2 () {
	$GLOBALS['v3'] =& $GLOBALS['v1'];
}
$v1 = 1;
$v2 = $v3 = 0;
test1();
echo $v2."\n";
test2();
echo $v3."\n";
exit;
$test =123;
abc();
function abc() {
	echo $GLOBALS['test'];
	exit;
	global $test;
	echo $test;
}
exit;
function animal() {
	$a = 123;
}
echo $a;
exit;
$arr = [1,2,3,4,5,6];
var_dump(array_sum($arr));
exit;
krsort($arr);
var_dump($arr);
exit;
$new_arr2 = array_chunk($arr,3);
var_dump($new_arr2);
exit;
$new_arr = array_slice($arr,1,3);
var_dump($arr);
var_dump($new_arr);
$new_arr1 = array_splice($arr,1,3);
var_dump($new_arr1);
var_dump($arr);
exit;


$new = ['a'=>'b'];

settype($new,'object');
gettype($new);
var_dump($new);
exit;
list($key,$value) = $new;
var_dump($key);
var_dump($value);
exit;
$num = [1,2,3];
list($key,$value) =each($num);
var_dump($key);
var_dump($value);
exit;
var_dump(array_reverse($num));
exit;
echo current($num);
echo max($num);
echo min($num);
exit;
echo mktime('2018-4-15');
exit;
$aa = 'adc';
echo ucwords($aa);
echo ucfirst($aa);
exit;
$str = '123';
echo str_repeat($str,3);
exit;
var_dump(chunk_split($str,2,'.'));
exit;
var_dump(str_split($str));
exit;
echo strlen($str);
echo mb_strlen($str);
